home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_vol_randquake.cog < prev    next >
Text File  |  1999-11-15  |  3KB  |  122 lines

  1. # Jones 3D Cog Script
  2. #
  3. # VOL_randquake.cog
  4. #
  5. # [CM]
  6. #
  7. # Random screenshakes for unstable areas.
  8. #
  9. # (C) 1998 LucasArts Entertainment Company LLC. All Rights Reserved
  10. #
  11. # ========================================================================================
  12.  
  13. symbols
  14. #...............MESSAGES..............
  15.     message        startup
  16.     message        crossed
  17.     message        pulse
  18.     message        timer
  19.  
  20. #...............ACTORS..............
  21.     thing        player                            local
  22.  
  23. #...............TRIGGERS..............
  24.     surface        cuesurf0                        linkID=4                                            
  25.     surface        cuesurf1                        linkID=4                    
  26.     
  27.     surface        onsurf                            linkID=1                
  28.     surface        onsurf1                            linkID=1                
  29.     surface        offsurf                            linkID=2                
  30.     surface        offsurf1                        linkID=2                
  31.    
  32. #...............VARIABLES..............
  33.     flex        shake                            local
  34.     int            rumblesound                        local
  35.     int            cueplayed=0                        local
  36.     int            i                                local
  37.     
  38.  
  39. #...............SOUNDS..............
  40.     sound        quake=nub_bull_move1_c.wav        local
  41.     sound        music=mus_gen_danger2.wav        local
  42.     sound        sayline=VL01J02.WAV                local    # "...volcano's still active"
  43.  
  44. end
  45.  
  46. # ========================================================================================
  47.  
  48. code
  49.  
  50. startup:
  51.  
  52.         player=GetLocalPlayerThing();
  53. return;
  54.  
  55. # ========================================================================================
  56.  
  57. crossed:
  58.  
  59.     If ((GetSenderID() == 4) && (cueplayed == 0))
  60.     {
  61.         cueplayed = 1;
  62.         PlaySoundLocal(music, 1.0, 0.0, 0x0, 0);
  63.         PlayVoice(player, sayline, 1.0,  0);
  64.         return;
  65.     }
  66.  
  67.  
  68.     If (GetSenderID() == 1) 
  69.         {
  70.             SetPulse(6);
  71.         }
  72.  
  73.  
  74.  
  75.     If (GetSenderID() == 2)
  76.         {
  77.             SetPulse(0);
  78.         }
  79. return;
  80.  
  81.  
  82. # ========================================================================================
  83.  
  84.  
  85.  
  86. pulse:
  87.  
  88.     shake = Rand();
  89.     
  90.     If (shake <= 0.33)
  91.     {
  92.         
  93.         #print("smallslow");
  94.         rumblesound = PlaySoundLocal(quake, 8, -1, 0x01, 0);
  95.         for (i=0 ; i <= 30; i = i + 1)
  96.             {
  97.                 SetPOVShake('0.0 0.0 0.001', '0.0 0.0 0.001', 80.0, 0.80);
  98.                 Sleep(.05);
  99.             }
  100.         StopSound(rumblesound, 1.0);
  101.     }
  102.  
  103.     If ((shake > 0.33) && (shake < .5))
  104.     {
  105.         #print("bigfast");
  106.         rumblesound = PlaySoundLocal(quake, 10, -1, 0x01, 0);
  107.         for (i=0 ; i <= 10; i = i + 1)
  108.             {
  109.                 SetPOVShake('0.0 0.0 0.003', '0.0 0.0 0.003', 80.0, 0.80);
  110.                 Sleep(.05);
  111.             }
  112.         StopSound(rumblesound, 1.0);
  113.     }
  114.  
  115.  
  116.  
  117. return;
  118.  
  119. # ========================================================================================
  120. end
  121.  
  122.